<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definitions" xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
  xmlns:camunda="http://camunda.org/schema/1.0/bpmn" targetNamespace="Examples">

  <message id="messageId" name="newMessage" />

  <process id="process" isExecutable="true">

    <startEvent id="theStart" />

    <sequenceFlow sourceRef="theStart" targetRef="subProcess" />

    <subProcess id="subProcess">
      <extensionElements>
        <camunda:inputOutput>
          <camunda:outputParameter name="outputMappingExecuted">${true}</camunda:outputParameter>
        </camunda:inputOutput>
      </extensionElements>

      <startEvent id="innerStart" />

      <sequenceFlow sourceRef="innerStart" targetRef="innerTask1" />

      <userTask id="innerTask1" />

      <sequenceFlow sourceRef="innerTask1" targetRef="innerEnd1" />

      <endEvent id="innerEnd1" />

      <boundaryEvent id="boundaryEvent" attachedToRef="innerTask1">
        <messageEventDefinition messageRef="messageId" />
      </boundaryEvent>

      <sequenceFlow sourceRef="boundaryEvent" targetRef="innerEnd2" />

      <endEvent id="innerEnd2" />

    </subProcess>

    <sequenceFlow sourceRef="subProcess" targetRef="theTask" />

    <userTask id="theTask" />

    <sequenceFlow sourceRef="theTask" targetRef="theEnd" />

    <endEvent id="theEnd" />

  </process>

</definitions>